<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://unpkg.com/vue@next"></script>
    <style>
        .box{
            width: 200px;
            height: 200px;
            background: darkcyan;
        }
    </style>
</head>
<body>
<div id="app">
    <div class="box" v-show="status">
        box元素
    </div>

    <!--下面是两种绑定元素的方式-->
    <button type="button" v-on:click="boxShow">显示box元素</button>
    <button type="button" @click="boxShow">显示box元素2</button>
</div>
</body>
<script>
    const app = Vue.createApp({
        data() {
            return {
                url: 'http://www.baidu.com',
                status: false
            }
        },
        methods:{
            boxShow(){
                this.status = !this.status;
            }
        }
    }).mount("#app")
</script>
</html>